unit UCadastroAreaAtuacao;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UFomCadastro, DBClient, Provider, DB, DBTables, Menus, StdCtrls,
  ComCtrls, DBCtrls, Buttons, Grids, DBGrids, ExtCtrls, Mask;

type
  TFCadastroAreaAtuacao = class(TFormCadastro)
    Label1: TLabel;
    DBText1: TDBText;
    Label3: TLabel;
    DBEDescricaoEntrada: TDBEdit;
    cdsCadastroARE_CODIGO: TIntegerField;
    cdsCadastroARE_DESCRICAO: TStringField;
    cdsCadastroUSUARIO: TStringField;
    cdsCadastroDATAMODIFICACAO: TDateTimeField;
    cdsCadastroUSUARIO_CADASTRO: TStringField;
    cdsCadastroUSUARIO_AUTERACAO: TStringField;
    cdsCadastroUSUARIO_EXCLUSAO: TStringField;
    cdsCadastroDATA_CADASTRO: TDateTimeField;
    cdsCadastroDATA_EXCLUSAO: TDateTimeField;
    cdsCadastroDATA_AUTERACAO: TDateTimeField;
    cdsCadastroEXCLUIDO: TStringField;
    cdsCadastroUSUARIO_RECUPERACAO: TStringField;
    cdsCadastroDATA_RECUPERACAO: TDateTimeField;
    cdsCadastroSITUACAO_DA_REPLICACAO: TStringField;
    cdsCadastroCODIGOEMPRESA: TIntegerField;
    cdsCadastroDATA_REPLICACAO: TDateTimeField;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure BtnIncluirClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FCadastroAreaAtuacao: TFCadastroAreaAtuacao;

implementation
uses UDmGestao, UGeral, PesquisaProdutos, UGestao, UPesquisaRapida;

{$R *.dfm}

procedure TFCadastroAreaAtuacao.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin

 FCadastroAreaAtuacao:=nil;
  inherited;

end;

procedure TFCadastroAreaAtuacao.BtnIncluirClick(Sender: TObject);
begin
  inherited;
  dsCadastro.DataSet.FieldByName('ARE_CODIGO').AsVariant := Retorna_Codigo_Generetor('GEN_AREA_ATUACAO');
end;

end.
